package com.dream.service.user.dao;

import com.dream.service.user.domain.model.UserFollowModel;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by houlijiang on 2016/5/18.
 */
public interface UserFollowDao {


    /**
     * 根据pin查询 FollowList个数
     *
     * @param pin 用户PIN
     * @return
     * @throws Exception
     */
    int followListCountByPIN(@Param("pin") String pin) throws Exception;

    /**
     * 根据pin查询
     *
     * @param pin      用户PIN
     * @param startNum
     * @param PageSize
     * @return
     * @throws Exception
     */
    List<UserFollowModel> selectByPIN(@Param("pin") String pin, @Param("start_num") Integer startNum,
                                      @Param("page_size") Integer PageSize) throws Exception;

    /**
     *
     * @param pin
     * @param spuList
     * @return
     * @throws Exception
     */
    public List<Long> selectByPINFollow(@Param("pin")String pin,@Param("followList")List<Long> spuList) throws  Exception;


    /**
     * 增加关注
     *
     * @param pin          用户PIN
     * @param designerList 设计师ID列表
     * @return
     * @throws Exception
     */
    int addUserFollow(@Param("pin") String pin, @Param("designer_list") List<Long> designerList) throws Exception;

    /**
     * 删除关注
     *
     * @param pin          用户PIN
     * @param designerList 设计师ID列表
     * @return
     * @throws Exception
     */
    int delUserFollow(@Param("pin") String pin, @Param("designer_list") List<Long> designerList) throws Exception;

}
